package com.timothy.android;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;

import com.timothy.chart.PieView;

public class Pie2DAnswerActivity extends Activity{
	private final static String LOG_TAG = "Pie2DAnswerActivity";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

//		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		
        int[] colors =new int[]{Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN};
        int[] shade_colors = new int[]{Color.rgb(180, 180, 0),Color.rgb(180, 20, 10),Color.rgb(3, 23, 163),Color.rgb(15, 165, 0)};
        int[] percent = new int[]{50,140,100,70};
        
        PieView pieView = new PieView(this,colors,shade_colors,percent);
        
        //显示自定义的饼图
        setContentView(pieView,new LayoutParams(400,200));
        
//        setContentView(pieView);
        
        //设置饼图的厚度
//        pieView.setThickness(20);
	}
	
}
